
// 导入路由处理函数 
const { checkToken } = require('../middleware')

const { handleUpload, handlegoodUpload } = require('../controller/common')

const { upload, goodupload } = require('../common/upload')


// 创建空表
const router = require('express').Router()


// 添加内容 
//  上传文件 
//头像
router.post('/upload', checkToken, upload.single('header'), handleUpload)
//商品图片
router.post('/goodupload', goodupload.single('good'), handlegoodUpload)

module.exports = router